﻿namespace Vibstudio.X4NET.Xml.XPath
{
    public class XPathInfo
    {
        public static XPathInfo Create(string value = "")
        {
            return Create(-1, value);
        }

        public static XPathInfo Create(int index, string value)
        {
            return new XPathInfo(index, value);
        }

        private XPathInfo(int index, string value)
        {
            Index = index;
            Value = value;
        }

        public int Index { get; set; }

        public string Value { get; set; }

        public string TagName
        {
            get { return Value.TagName(); }
        }
    }
}